package com.cn.demo.springboot.shiro.entity;

public class Menu {

	private Integer menuId; 
	private String menuName;
	private String menuCode;
	private String parentCode;
	private Integer listSort;
	private Integer level;
	public Integer getMenuId() {
		return menuId;
	}
	public void setMenuId(Integer menuId) {
		this.menuId = menuId;
	}
	public String getMenuName() {
		return menuName;
	}
	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}
	public String getMenuCode() {
		return menuCode;
	}
	public void setMenuCode(String menuCode) {
		this.menuCode = menuCode;
	}
	public String getParentCode() {
		return parentCode;
	}
	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}
	public Integer getListSort() {
		return listSort;
	}
	public void setListSort(Integer listSort) {
		this.listSort = listSort;
	}
	@Override
	public String toString() {
		return "Menu [menuId=" + menuId + ", menuName=" + menuName + ", menuCode=" + menuCode + ", parentCode="
				+ parentCode + ", listSort=" + listSort + "]";
	}
	public Menu(Integer menuId, String menuName, String menuCode, String parentCode, Integer listSort) {
		super();
		this.menuId = menuId;
		this.menuName = menuName;
		this.menuCode = menuCode;
		this.parentCode = parentCode;
		this.listSort = listSort;
	}
	public Menu() {
		super();
	}
	
	public Integer getLevel() {
		return level;
	}
	public void setLevel(Integer level) {
		this.level = level;
	}
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Menu) {
			Menu menu = (Menu) obj;
			if (this.listSort.equals(menu.getListSort()) && this.menuCode.equals(menu.getMenuCode())
					&& this.menuName.equals(menu.getMenuName()) && this.parentCode.equals(menu.getParentCode())) {
				return true;
			} else {
				return false;
			}
		}
		return super.equals(obj);
	}
	
}
